package cn.controller.marketing;

import cn.service.marketingService.MarketingServiceImpl.HotMarketingServiceImpl;
import entity.marketingEntity.NewMarketingCondition;
import entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 朱颢阳
 * @description
 * @time 2024/8/30 9:27
 */
@RestController
@CrossOrigin
@RequestMapping("/marketing")
public class HotMarketingController {
    @Autowired
    HotMarketingServiceImpl service;
    @RequestMapping("/getHotMarking")
    public Result getHotMarking(@RequestBody NewMarketingCondition condition){
        return service.getHotMarking(condition);
    }
    @RequestMapping("/updateHotMarkingRecommend")
    public Result updateHotMarkingRecommend(Integer id,Integer recommend){
        return service.updateHotMarkingRecommend(id,recommend);
    }
    @RequestMapping("/updateHotMarkingSort")
    public Result updateHotMarkingSort(Integer id,Integer sort){
        return service.updateHotMarkingSort(id,sort);
    }
    @RequestMapping("/addHotMarketing")
    public Result addHotMarketing(@RequestBody List<String> list){
        return service.addHotMarketing(list);
    }
    @RequestMapping("/deleteHotMarketing")
    public Result deleteHotMarketing(Integer id){
        return service.deleteHotMarketing(id);
    }
}
